/**
 * Created by ClearLiang on 2019/4/17
 * Function:
 * Desc:
 */
import React, {Component} from 'react';
import {StyleSheet, Text, View, ActivityIndicator, Image} from 'react-native';

export default class List_Movies extends Component {

    // 初始化state
    constructor(props) {
        super(props);
        this.state = {};
    }

    // 加载后
    componentDidMount(): void {
        console.log('componentDidMount')
    }

    // 移除前
    componentWillUnmount(): void {
        console.log('componentWillUnmount')
    }

    loadingView = () => {
        return (
            <ActivityIndicator color={'grey'} size={'small'} animating={true}/>
        );
    };

    errorView = () => {
        return (
            <View>
                <Image height={100} width={150} source={require('../images/error_red.png')} blurRadius={10} resizeMethod={'stretch'}/>
            </View>
        );
    };

    completeView = () => {
        return (
            <ActivityIndicator color={'grey'} size={'small'} animating={true}/>
        );
    };

    render() {

        return (
            <View style={[styles.root]}>
                <Text>Hello World</Text>
            </View>

        );
    }
}

// 构建样式
const styles = StyleSheet.create({
    root:{

    },
});